<script>
	export default {
		onLaunch: function() {
			console.log("onLaunch start")

			console.log("onLaunch end")
		},
		onShow: function() {
			console.log('App Show start')
			const _this = this;
			this.syncSystemInfo();
			this.boundParentUser();
			const authorization = uni.getStorageSync("Authorization");
			if (this.isNull(authorization)) {
				uni.login({
					provider: 'weixin',
					success: function(res) {
						//用户登录获取用户信息
						_this.$u.get(`/login/wxLogin/${_this.systemId}/${res.code}`).then(res => {
							if (res.code != 200) {
								return;
							}
							uni.setStorageSync("Authorization", res.data.tokenId)
							uni.setStorageSync("user", res.data.user);
							uni.setStorageSync("systemShare", res.data.systemShare);
						});
					}
				})
			}
			console.log('App Show end')
		},
		onHide: function() {
			console.log('onHide')
		}
	}
</script>

<style lang="scss">
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "uview-ui/index.scss";
	/*每个页面公共css */

	.margin-ten {
		margin: 10px;
	}

	.margin-top-ten {
		margin-top: 10px;
	}

	.margin-five-ten {
		margin-top: 5px;
	}

	.mrgin-right-ten {
		margin-right: 10px;
	}
.mrgin-right-two {
		margin-right: 20px;
	}
	.flex-column {
		display: flex;
		flex-direction: column;
	}

	.flex-row {
		display: flex;
		flex-direction: row;
	}
</style>
